FlightGear Tracker API |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Location: (IPv4 and IPv6) https://fgtracker.us.to/modules/fgtracker/interface.php
Header reply:
Error code and it’s definition:
Data reply: 1. To
get a report of a particular callsign: https://fgtracker.us.to/modules/fgtracker/interface.php?action=flights&callsign=Quofei
2. Log of data changes of
particular callsign: https://fgtracker.us.to/modules/fgtracker/interface.php?action=alterlog&callsign=Quofei
3. To get a report of a
particular flight: https://fgtracker.us.to/modules/fgtracker/interface.php?action=flight&flightid=3912093
|
4. To get live data (waypoints) from FGTracker: https://fgtracker.us.to/modules/fgtracker/interface.php?action=livewaypoints
Array |
Type |
Description |
GET Parameter |
$reply["data"]["wpt"] |
Array |
Array
of way points |
N/A |
$reply["data"]["wpt"][]["flight_id"] |
int |
Flight
id in DB |
N/A |
$reply["data"]["wpt"][]["callsign"] |
String |
Callsign |
N/A |
$reply["data"]["wpt"][]["model"] |
String |
Aircraft
model in human readable format. NULL if no such information in FGTracker |
N/A |
$reply["data"]["wpt"][]["model_raw"] |
String |
Aircraft
model in “--aircraft” format |
N/A |
$reply["data"]["wpt"][]["time"] |
String |
Time of
waypoint recorded |
N/A |
$reply["data"]["wpt"][]["time_raw"] |
int |
Time of
waypoint recorded in seconds (since Unix
epoch) |
N/A |
$reply["data"]["wpt"][]["lat"] |
Float |
Latitude
of waypoint recorded |
N/A |
$reply["data"]["wpt"][]["lon"] |
Float |
Longitude
of waypoint recorded |
N/A |
$reply["data"]["wpt"][]["alt"] |
Float |
Altitude
of waypoint recorded |
N/A |
$reply["data"]["wpt"][]["hdg"] |
Float |
Heading of the plane |
N/A |
$reply["data"]["wpt"][]["speed_kts"] |
Float |
Calculated speed of the
flight |
N/A |
$reply["data"]["wpt"][]["current_status"] |
String |
Current status. “OPEN” – still flying, “CLOSED”
– already left. |
N/A |
5. To get live data (pilots) from FGTracker: https://fgtracker.us.to/modules/fgtracker/interface.php?action=livepilots
* Please note there is performance impact (around 3
sec) if wpt flag (include waypoint information) is defined.
Array |
Type |
Description |
GET
Parameter |
$reply["data"]["pilot"] |
Array |
Array of flying pilots
(Return NULL if no data) |
N/A |
$reply["data"]["pilot"][]["callsign"] |
String |
Callsign |
&callsign=<String callsign> (optional) |
$reply["data"]["pilot"][]["flight_id"] |
int |
Flight
id in DB |
N/A |
$reply["data"]["pilot"][]["model"] |
String |
Aircraft
model in human readable format. NULL if no such information in FGTracker |
N/A |
$reply["data"]["pilot"][]["model_raw"] |
String |
Aircraft
model in “--aircraft” format |
N/A |
$reply["data"]["pilot"][]["start_time"] |
String |
Flight
start time |
N/A |
$reply["data"]["pilot"][]["start_time_raw"] |
int |
Flight
start time in seconds (since Unix
epoch) |
N/A |
$reply["data"]["pilot"][]["start_location"]["port_id"] |
int |
ID of the departure aviation
port. NULL if start location is not an aviation port |
N/A |
$reply["data"]["pilot"][]["start_location"]["icao"] |
String |
ICAO name/identifier (if
ICAO name not exist) of the departure aviation port. “----” if start location is not an
aviation port |
N/A |
$reply["data"]["pilot"][]["start_location"]["icao_name"] |
String |
Name of the departure
aviation port. “Unknown” if start location is not an aviation port |
N/A |
$reply["data"]["pilot"][]["start_location"]["country"] |
String |
Country which the departure airport
locates. ISO 3166-1 alpha-2 codes. NULL if unknown |
N/A |
$reply["data"]["pilot"][]["start_location"]["city"] |
String |
Region/City which the
departure airport locates. NULL if unknown |
N/A |
$reply["data"]["pilot"][]["wpt"] |
Array |
Array
of way points (order by time descending) |
&wpt=y, otherwise
missing |
$reply["data"]["pilot"][]["wpt"][]["time"] |
String |
Time of
waypoint recorded |
&wpt=y, otherwise
missing |
$reply["data"]["pilot"][]["wpt"][]["time_raw"] |
int |
Time of
waypoint recorded in seconds (since Unix
epoch) |
&wpt=y, otherwise
missing |
$reply["data"]["pilot"][]["wpt"][]["lat"] |
Float |
Latitude
of waypoint recorded |
&wpt=y, otherwise
missing |
$reply["data"]["pilot"][]["wpt"][]["lon"] |
Float |
Longitude
of waypoint recorded |
&wpt=y, otherwise
missing |
$reply["data"]["pilot"][]["wpt"][]["alt"] |
Float |
Altitude
of waypoint recorded |
&wpt=y, otherwise
missing |
$reply["data"]["pilot"][]["wpt"][]["hdg"] |
Float |
Heading of the plane |
&wpt=y, otherwise
missing |
6. To show the pilot list (order by rank): https://fgtracker.us.to/modules/fgtracker/interface.php?action=pilotlist
Array |
Type |
Description |
GET
Parameter |
$reply["data"]["pilot_list_offset"] |
int |
Offset of the pilot list If offset > number of pilots, offset=0 |
&offset=<int
offset> (default=0) |
$reply["data"]["no_of_pilots"] |
int |
Total number of pilots in DB |
N/A |
$reply["data"]["orderby"] |
String |
The list is order by |
&orderby=<String orderby > (default="alltime") |
$reply["data"]["pilot"] |
Array |
Array of pilots (100
records) |
N/A |
$reply["data"]["pilot"][]["rank"] |
int |
Rank (according to effective
flight time) |
N/A |
$reply["data"]["pilot"][]["callsign"] |
String |
Callsign |
N/A |
$reply["data"]["pilot"][]["lastweek"] |
String |
Total flight time in last 7
days |
N/A |
$reply["data"]["pilot"][]["lastweek_raw"] |
int |
Total flight time in last 7
days in seconds |
N/A |
$reply["data"]["pilot"][]["last30days"] |
String |
Total flight time in last 30
days |
N/A |
$reply["data"]["pilot"][]["last30days_raw"] |
int |
Total flight time in last 30
days in seconds |
N/A |
$reply["data"]["pilot"][]["total_flight_time"] |
String |
Total flight time all time |
N/A |
$reply["data"]["pilot"][]["total_flight_time_raw"] |
int |
Total flight time all time
in seconds |
N/A |
$reply["data"]["pilot"][]["effective_flight_time"] |
String |
Total effective flight time
all time |
N/A |
$reply["data"]["pilot"][]["effective_flight_time_raw"] |
int |
Total effective flight time
all time in seconds |
N/A |
7. 10 recent started/ended flight: https://fgtracker.us.to/modules/fgtracker/interface.php?action=recentstateswitch
Array |
Type |
Description |
GET
Parameter |
$reply["data"]["started"]["pilot"] |
Array |
Array of recent started
flight (10 records) |
N/A |
$reply["data"]["started"]["pilot"][]["flight_id"] |
int |
Flight
id in DB |
N/A |
$reply["data"]["started"]["pilot"][]["callsign"] |
String |
Callsign |
N/A |
$reply["data"]["started"]["pilot"][]["model"] |
String |
Aircraft
model in human readable format. NULL if no such information in FGTracker |
N/A |
$reply["data"]["started"]["pilot"][]["model_raw"] |
String |
Aircraft
model in “--aircraft” format |
N/A |
$reply["data"]["started"]["pilot"][]["start_time"] |
String |
Flight
start time |
N/A |
$reply["data"]["started"]["pilot"][]["start_time_raw"] |
int |
Flight
start time in seconds (since Unix
epoch) |
N/A |
$reply["data"]["ended"]["pilot"] |
Array |
Array of recent ended flight
(10 records) |
N/A |
$reply["data"]["ended"]["pilot"][]["flight_id"] |
int |
Flight
id in DB |
N/A |
$reply["data"]["ended"]["pilot"][]["callsign"] |
String |
Callsign |
N/A |
$reply["data"]["ended"]["pilot"][]["model"] |
String |
Aircraft
model in human readable format. NULL if no such information in FGTracker |
N/A |
$reply["data"]["ended"]["pilot"][]["model_raw"] |
String |
Aircraft
model in “--aircraft” format |
N/A |
$reply["data"]["ended"]["pilot"][]["end_time"] |
String |
Flight end time |
N/A |
$reply["data"]["ended"]["pilot"][]["end_time_raw"] |
int |
Flight end time in seconds (since Unix epoch) |
N/A |
8. Airport information: https://fgtracker.us.to/modules/fgtracker/interface.php?action=airport&icao=VHHX
https://fgtracker.us.to/modules/fgtracker/interface.php?action=airport&aid=6523
*Please note that ICAO name/identifier in the database is *NOT* unique. For example, “ZPPP”, as this ICAO code
has been reused in different locations. In such case, the API will return any
one of them.
Array |
Type |
Description |
GET
Parameter |
$reply["data"]["port_id"] |
int |
ID of
the aviation port |
&aid=<int port_id> |
$reply["data"]["icao"] |
String |
ICAO name/identifier (if
ICAO name not exist) of the aviation port |
&icao=<String
icao>. Ignored if &aid is defined |
$reply["data"]["name"] |
String |
Airport name defined in
https://ourairports.com |
N/A |
$reply["data"]["type"] |
int |
Type of aviation port |
N/A |
$reply["data"]["type_code"] |
String |
Type code of aviation port.
Type code is defined in Terminology |
N/A |
$reply["data"]["lat"] |
Float |
Latitude
of airport |
N/A |
$reply["data"]["lon"] |
Float |
Longitude
of airport |
N/A |
$reply["data"]["alt"] |
Float |
Altitude
of airport |
N/A |
$reply["data"]["city"] |
String |
City/Region that the airport
locates |
N/A |
$reply["data"]["country"] |
String |
Country that the airport
locates |
N/A |
$reply["data"]["homelink"] |
String |
Home page of the airport.
Missing if no such information |
N/A |
$reply["data"]["wikilink"] |
String |
Wikipedia page of the
airport. Missing if no such information |
N/A |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9.FGMS status: https://fgtracker.us.to/modules/fgtracker/interface.php?action=fgmsstatus
Array |
Type |
Description |
GET
Parameter |
$reply["data"][] |
Array |
Array of FGMS registered in
FGTracker |
N/A |
$reply["data"][]["name"] |
String |
Name of
the FGMS |
N/A |
$reply["data"][]["domain"] |
String |
Domain/IP of the FGMS |
N/A |
$reply["data"][]["protocol_ver"] |
String |
Protocol
version required by FGMS for connecting to FGTracker |
N/A |
$reply["data"][]["protocol_ver"] |
String |
(Last report of) FGMS version |
N/A |
$reply["data"][]["maintainer"] |
String |
Name of
the maintainer. NULL if no information |
N/A |
$reply["data"][]["location"] |
String |
Location
of the FGMS. NULL if no information |
N/A |
$reply["data"][]["tracking_count"] |
Int |
Number of tracking flights |
N/A |
$reply["data"][]["last_seen"] |
string |
Last seen
time. NULL if the server never (successfully) connected to FGTracker |
N/A |
$reply["data"][]["last_seen_raw"] |
Int |
Last
seen time in seconds (since Unix
epoch). NULL if
the server never (successfully) connected to FGTracker |
N/A |
$reply["data"][]["enabled"] |
Boolean |
TRUE if FGMS is allowed to
feed data to FGTracker, while FALSE is vice versa |
N/A |
10. GeoJSON: https://fgtracker.us.to/modules/fgtracker/interface.php?action=geojson&flightid=7653782
GET Parameter:
&flightid=<Int flightid>. Output is strictly complied with RFC7946.